﻿using System;
using System.Collections.Generic;
using System.Text;
using Maticsoft.DBUtility;

namespace ExtendBLL
{
    public class OpentProject:LabMS.BLL.OpentProject
    {
        public void UpdateStatus(string strNewStatus, string ID)
        {
            StringBuilder strSql = new StringBuilder();
            strSql.Append("update OpentProject set OP_Audit ='" + strNewStatus + "' where [ID] = " + ID.ToString());
            try
            {
                DbHelperSQL.ExecuteSql(strSql.ToString());
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }

        public void SetCheck(string strNewStatus, string ID, string strCheckTime, string strChecker, string strCheckContent)
        {
            StringBuilder strSql = new StringBuilder();
            strSql.Append("update OpentProject set OP_Audit ='" + strNewStatus + "', CheckTime= '" + strCheckTime
                                + "',OP_Approval='" + strChecker + "',AuditOpinion='" + strCheckContent 
                                + "'  where [ID] = " + ID.ToString());
            try
            {
                DbHelperSQL.ExecuteSql(strSql.ToString());
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
    }
}
